]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shell-util: ensure we've a valid n_captures when capturing images
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Thu, 8 Jun 2017 12:16:04 +0000 (20:16 +0800)
committerJonas Ådahl <jadahl@gmail.com>
Fri, 14 Jul 2017 13:01:48 +0000 (21:01 +0800)
https://bugzilla.gnome.org/show_bug.cgi?id=765011

src/shell-util.c

index 02db9b1060f33cb1a6175f511d81e03cd0e326e8..bedd5869b03a8f53cb984031e7aba98a4f2628b5 100644 (file)
@@ -461,6 +461,8 @@ shell_util_composite_capture_images (ClutterCapture  *captures,
   cairo_surface_t *image;
   cairo_t *cr;
 
+  g_assert (n_captures > 0);
+
   target_scale = 0.0;
   for (i = 0; i < n_captures; i++)
     {